fix type check bug comparing lambda results