verifying whether cube name is valid in select function