null safety in enum converter