Boolean isActive = GetterUtil.getBoolean(request.getAttribute("isActive"), false);
Boolean isActive = GetterUtil.getBooleanValue(user.getExpandoBridge().getAttribute("IsActive"));In this example, if the attribute "IsActive" is not found in the user's expando bridge or if its value is not a boolean, isActive will be set to null. Overall, the `com.liferay.portal.kernel.util.GetterUtil` is a useful class for getting values from different data types and handling null values in Java.