preventing an exception on getting null set id