Check if keyspace/table exist

Without the check, a NPE was thrown and the connection to cluster
was not cleanly shut down. The open connection was making the jobs
hang after an error ocurred.