Fix #ifdef typo

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Add checks for when printing null strings

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>