The function of checking the existence of the parent attribute

I tried this plugin:

if defined?($dc_observers)
  # Open SketchUp's Dynamic Component Functions (V1) class.
  # only if DC extension is active
 
class DCFunctionsV1

  protected
 
  # return 1 if exist and 0 if not
  # Usage: = framing_exist()
  def framing_exist(a_value)
if (defined?(a_value)).nil?
        return 1
else
	return 0
end#if

  end
  protected:framing_exist
 
 
end#class

end#if

error: unknown function