gsocket: Add missing preconditions to g_socket_send_message()