avoid call method 'toString' of undefined