Function isEqual

Returns true if grids a and b are equal in value. Returns false if either parameter is undefined.