extension method checks the value of the enum passed