type can be null
nullable check for generic is based on constraints