A fix for bug #7920.
This fixes #7923.  It now checks for an object.