Added proper handling for when context.object does not exist