added check for null text before trying to perform redaction