Fix NPE caused by CASSANDRA-6818

patch by yukim; reviewed by thobbs for CASSANDRA-6984