Check for null when querying login window