Fix substitution filter: type validation not working during add