You don't seem to be checking !base64Encoder here like you do above, assuming this could be null in this function, this call would be unsafe.