Generic Type class to handle multiple type values