Put NPE check inside of synchronization code