Added simple check to ensure connectionObj is present.