Only check in debug mode.