filter_var: fixes bug 67167

Fixes bug 67167 by adding a check for FILTER_NULL_ON_FAILURE.