Weapon equipped check

I was wondering how I could go about making it to where when I right click it only aims if a gun is equipped

Where do I go about doing this and how? TIA appreciate any response

get equipped weapon > IsValid? > continue with aiming logic