code: public static boolean isFunctionOfType(Expression expr, FunctionDefinition.Type type) {
  		return expr instanceof CallExpression &&
  			((CallExpression) expr).getFunctionDefinition().getType() == type;
  	}
docs: Checks if the expression is a function call of given type.
  
  @param expr expression to check
  @param type expected type of function
  @return true if the expression is function call of given type, false otherwise