check for a valid point