Fix NullPointerException associated with excludePrefixes