Avoid crash of connection when passed invalid parameters (e.g. atoms)