Generating Required attribute if the field is not nullable.