Fixes the issue in LP #1331744 comment #2

how about returning nil here to avoid the double print. The user has already got the error.