validation for nil