Make sure the tooltip dialog is not null

This prevents a javascript error.