Corrected _isPrimitive error and removed _getKey