remove log output
variables cannot be null here
using equals is safer
throw the exception