make sure we check for valid object before attempting to set it since it's perfect valid to pass a null in for an out variable