Add unit test for #47

Added a check to make sure null values are not accepted in required fields.