code: public boolean isAssociatedTo(Class<? extends Model> targetModelClass) {
  
          if(targetModelClass == null){
              throw  new NullPointerException();
          }
  
          for (Association association : associations) {
              if (association.getTargetClass().getName().equals(targetModelClass.getName())) {
                  return true;
              }
          }
          return false;
      }
docs: Checks if there is association to the target model class.,
  
  @param targetModelClass class of a model that will be checked for association from current model.
  @return true if any association exists such that the current model is a source and targetModelClass is a target.