misunderstanding. I mean that `func` can be initialized as `0` (for e.g. if `type == CV_64FC17`), so you should check whether `func` is `0` or not. 
But what's regarding returned value - I don't know.