Moved too specific function out of ExpressionTypingUtils (and refactored it)