I am getting an "Argument of type \'string | null\' is not assignable to parameter of type \'string\'." error while typecasting a string into Integer type in my compon