output: #fixed code
                                  static String checkModelForParametrizedValue(String seleniumVersion, Model model) {
          String version = getNamePropertyName(seleniumVersion);
  
          if (nonNull(model.getProperties())) {
              return model.getProperties().getProperty(version);
  
          } else if (nonNull(System.getProperty(version))) {
              return System.getProperty(version);
  
          } else if (nonNull(model.getProfiles()) && model.getProfiles().size() > 0) {
              return getVersionNameFromProfiles(version, model);
  
          } else {
              return null;
          }
      }
input: #vulnerable code 
                                  static String checkModelForParametrizedValue(String seleniumVersion, Model model) {
          String version = getNamePropertyName(seleniumVersion);
          String versionProp = null;
  
          if (nonNull(seleniumVersion) && nonNull(model.getProperties())) {
              versionProp = model.getProperties().getProperty(version);
  
          } else if (nonNull(seleniumVersion) && nonNull(System.getProperty(version))) {
              versionProp = System.getProperty(version);
  
          } else if (nonNull(seleniumVersion) && nonNull(model.getProfiles()) && model.getProfiles().size() > 0) {
              versionProp = model.getProfiles().stream()
                      .filter(prof ->
                              nonNull(prof.getProperties()) && nonNull(prof.getProperties().getProperty(version)))
                      .findAny()
                      .map(prof -> prof.getProperties().getProperty(version))
                      .orElse(null);
          }
          return versionProp;
      } 
                              #location 8 
                              #vulnerability type NULL_DEREFERENCE