handle null value in call to ws