Check study exists before testing state