fix a warning if $sysobjectid is undef

closes: #2266

Reported-by: Tomás Abad <tabadgp@gmail.com>