fixed missing question mark for nil detection