Update type_filtering.py

Additional comments added