sanity check input coordinates