some nil value protection hack