Is there a way to add a condition to a popup so that a field is not displayed when null and have a field appear when that field has a value?
Yes, with an Arcade Expression. Check out this blog to learn more:
Conditional Field display with Arcade in Pop Ups
Retrieving data ...