Use valueOf to determine queryType (Android)