Check types correctly