code: public static boolean isSaneRequest(HttpServletRequest request) {
          if (request != null && request.getMethod() != null) {
              return true;
          }
          return false;
      }
docs: Checks if request and request method are not null
  
  @param request {@link HttpServletRequest} to check
  @return true if sane, false otherwise