Fix null issue for capitalization filter