Be defensive with factory return value