For a Java IRC client I have a login funtion. If you type "!LOGIN user pass" it will log you in. 

Right now if a user uses a space too much or only uses 1 parameter in stead of "user" + "pass" it will crash the programm due to the way I am spliting the line. 

I`m having trouble to find a solution so I can make a check if string user or string pass != null..

Any suggestions would be very much appreciated! 

```
if (line.contains("!LOGIN")){  //!LOGIN username password
  String[] parts = line.split(" ");
  String user = parts[4]; 
  String pass = parts[5];
}

```