check_inputs function

Check spatial inputs