Fix dict check