protected String getAttributeAsString(final String name) {
        val value = getAttribute(name);
        if (value != null) {
            return value.toString();
        }
        else {
            return null;
        }
    }
<p>getAttributeAsString.</p>

@param name a {@link String} object
@return a {@link String} object
pac4j-core/src/main/java/org/pac4j/core/profile/CommonProfile.java