allow undefined to be caught as well