Here's an even better solution:

```Java
if ( battleTag.contains(" ") {
    //Toast, clear(), return
}
```