Cannot create WGS84 point with invalid coordinate

I have used spatial functions successfully in earlier versions of neo4j but now gives error when I run on 4.0

match (g1:gps), (g2:gps)
return
distance(point({latitude:g1.latitude,longitude:g1.longitude}),point({latitude:g2.latitude,longitude:g2.longitude}))

No I get an error like this:

Cannot create WGS84 point with invalid coordinate: [37.09, -95.713]. Valid range for Y coordinate is [-90, 90].

Looks like your query might be blending 2D and 3D spatial logic.

When you plot the geographic coordinates on a two-dimensional map you apply a map projection. So when you plot the geographic locations in WGS84 on a map where you the horizontal axis represents longitude between -180° and +180° then the vertical axis represents latitude between -90° and +90° then you get a world map in the Plate Carree projection. - http://support.virtual-surveyor.com/en/support/solutions/articles/1000261351-what-is-wgs84-

Your longitude value -95.713 is invalid according to 2D. Have you tried specifying a CRS value like some of the examples here?