checking type first...