class SerializationUtil {

    public static <T extends Serializable> T deserialize(String object) {
        return Optional.ofNullable(object)
                .map(Base64.getDecoder()::decode)
                .<T>map(SerializationUtils::deserialize)
                .orElse(null);
    }

}