Remember that the IF function allows you to make logical comparisons between a value and what you expect. The "formula" that can explain the above is the following
IF(Something is True, then do something, otherwise do something else)
Based on what you need, The best and the easiest one is:
=IF($F4>0,$H4/$G4,"N/A")
where $F4>0 will be something that is true
where $H4/$G4 is the the do something
and where "N/A" is the otherwise do something else