Handle Circumstances Where connection is nil Before Attempting Insert

This update provides a simple sanity check to make sure that
connection is not nil before trying to add it to the _connections array.
Formerly the library would cause an application crash if connection was
nil when attempting to insert it into the _connections array.