improve error message for required property