Added some null validations