Add check for undefined or null arg in tail
Add QM.and and QM.or