NPE check in getTimeInMillis()

added a null check to getTimeInMillis()
and remove the null passed parameters
To be fair it's somewhat more descriptive than just NPE due null dereferencing. 
Still, I'd throw IllegalArgumentException instead.