Include namespace references when creating object methods
Do not continue processing if instance is null