code: public <T> T get(String name, Class<T> type){
          return get(name) != null? type.cast(get(name)) : null;
      }
docs: Convenience method, will do internal check for null and then cast. Will throw  <code>ClassCastException</code>
  only in case the object in session is different type than expected.
  
  @param name name of session object.
  @param type expected type
  @param <T> type of the returned object
  @return object in session, or null if not found.