Improved error handling when lambda expression missing =>