final public static int len(byte[] b) {
    return b == null ? 0 : b.length;
  }
Returns length of the byte array, returning 0 if the array is null. Useful for calculating
sizes.
@param b byte array, which can be null
@return 0 if b is null, otherwise returns length
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java