Put a check in to prevent NPE on a spurious focusGained message on Mac