avoid magic numbers for type() calls