Fix findPrimaryConnection() to return null if no connection is found (SOCIAL-361)