At the very beginning of the movie, Bond is in an office with an antagonist, when the man suddenly pulls a gun and tries to shoot Bond. The gun only goes “click” at which point Bond holds up the magazine which he obviously removed saying, “I know where you keep your gun”.
The second the antagonist grabbed his gun, he would have had to know it was empty as the weight difference between a loaded and unloaded pistol is very obvious.