Make sure callback is a function if not convert it