_[Original issue](https://code.google.com/p/guava-libraries/issues/detail?id=1259) created by **yurachud** on 2013-01-16 at 04:20 PM_

---

If we pass null to Ints.tryParse it throws NullPointerException.
Method uses AndroidInteger.tryParse(), but the first line there is checkNotNull() method.

* <p>Unlike {@link Float#parseFloat(String)}, this method returns {@code null} instead of
   * throwing an exception if parsing fails. Valid inputs are exactly those accepted by {@link
   * Float#valueOf(String)}, except that leading and trailing whitespace is not permitted.
   *
   * <p>This implementation is likely to be faster than {@code Float.parseFloat} if many failures
   * are expected.
   *
   * @param string the string representation of a {@code float} value
   * @return the floating point value represented by {@code string}, or {@code null} if {@code
   *     string} has a length of zero or cannot be parsed as a {@code float} value
   * @since 14.0
   */
  @Beta
  @GwtIncompatible 
  @NullableDecl
  public static Float tryParse(String string) {
    if (Doubles.FLOATING_POINT_PATTERN.matcher(string).matches()) {
      
      
      try {
        return Float.parseFloat(string);
      } catch (NumberFormatException e) {
        
        
      }
    }
    return null;
  }
}