public Boolean getBOOL(String attrName) {
        final Object val = attributes.get(attrName);
        if (val instanceof Boolean)
            return (Boolean)val;
        if (val instanceof String) {
            if ("1".equals(val))
                return true;
            if ("0".equals(val))
                return false;
            return Boolean.valueOf((String)val);
        }
        throw new IncompatibleTypeException("Value of attribute " + attrName
                + " of type " + getTypeOf(attrName)
                + " cannot be converted into a boolean value");
    }
Returns the value of the specified attribute in the current item as a
non-null Boolean.

@throws IncompatibleTypeException
            if either the attribute doesn't exist or if the attribute
            value cannot be converted into a non-null Boolean value

@see #isNull(String) #isNull(String) to check if the attribute value is
     null.
@see #isPresent(String) #isPresent(String) to check if the attribute
     value is present.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java