Changed comprobation to angular native way.