be more defensive

Signed-off-by: Stephen Gran <steve@lobefin.net>