Hide a field in a view if it is empty
Check if the screenshot settings work for you,this the setting for the field you want to hide when empty. It provides option to hide the rewritten content as well.