This should not be a problem. I don't see anything wrong with the syntax either.
To make sure you could catch the return value in a variable and see if that solves your problem.
That would also make it easier to inspect what came back from the function.