private void semanticCheck(String id) {
    if (getFunction(id) == null && getVariable(id) == null)
      throw new NoSuchIdentifierException(id);
    if (statId.isFunction())
      checkArgumentsIfExist(id);
    else if (!getTypeOfVariable(id).isOfSameType(statId.getType()))
      generateException();
  }