Method to cast an integer to an enum
EmptyIfNull for IEnumerable