refactored the all operator and added exception handling to the skipWhile operator