IDEX-1813. Fixed NullPoiner Exception for case when we close project whi...

Added code to check the equality to null of Worker.