Replace dataTypeEquals class with lambda