private void doCheck(PsiExpression expression) {
      final PsiType type = expression.getType();
      if (type == null) {
        return;
      }
      if (!type.equals(PsiTypes.booleanType())) {
        return;
      }
      registerError(expression);
    }
private void doCheck(PsiExpression expression)