Added try/catch to NullPointerException
This exception occurs when the screen is
locked and the jvm attempts to get the
mouse location