Added support for required fields based on nullable