public static <T> T defaultIfNull(T object, T defaultValue) {
        return object != null ? object : defaultValue;
    }
<p>Returns a default value if the object passed is {@code null}.</p>

<pre>
ObjectUtils.defaultIfNull(null, null)      = null
ObjectUtils.defaultIfNull(null, "")        = ""
ObjectUtils.defaultIfNull(null, "zz")      = "zz"
ObjectUtils.defaultIfNull("abc", *)        = "abc"
ObjectUtils.defaultIfNull(Boolean.TRUE, *) = Boolean.TRUE
</pre>

@param <T> the type of the object
@param object  the {@code Object} to test, may be {@code null}
@param defaultValue  the default value to return, may be {@code null}
@return {@code object} if it is not {@code null}, defaultValue otherwise
android/android_framework/base/src/main/java/lang3/ObjectUtils.java