Merge "Added null check on return value for getKeyDispatcherState()"