Properly reject invalid data