test if the input is empty explicitly, since it might contain nil