         result[i] = obj[@[attrname].field]
 
       # otherwise, if the attribute exists on the object, return that value
-      else if obj[attrname]
+      else if attrname of obj
         result[i] = obj[attrname]
 
       # finally, check for a default value on this property object that could be returned

    @number(styleprovider, glyphspec, @text_alpha_name)
    @enum(styleprovider, glyphspec, @text_align_name, "left right center")
    @enum(styleprovider, glyphspec, @text_baseline_name, "top middle bottom alphabetic hanging")
  font:(obj, font_size) ->
    if not font_size?
      font_size = @select(@text_font_size_name,  obj)

        return obj[@[attrname].field]

    # otherwise, if the attribute exists on the object, return that value
    if attrname of obj
      return obj[attrname]

    # finally, check for a default value on this property object that could be returned
