Thanks for your answer David! I've done a very similar thing when operating with the date i've shown to calculate another date, my function goes as:
if(isInt(body('Update_a_row')?['Fecha sobre']), addDays('1899-12-30', int(body('Update_a_row')?['Fecha sobre']), 'g'), body('Update_a_row')?['Fecha sobre'])
So it checks if it's an int before the operation because weirdly, sometimes is an int and other times is a date. I'd like a different solution than this because i already have a function to insert my previous date, the one i've shown, but meanwhile i'll try to merge both functions, if it works i'll mark this as solved, thanks again! If anyone has a simpler solution i'd appreciate it very much.
EDIT: I've merged both functions and it seems to work, here's the result function in case anyone needs to see it:
if(equals('date', null), '0', if(isInt('date'), addDays('1899-12-30', int('date'), 'g'), formatDateTime('date', 'dd-MM-yyyy')))
For simplicity's sake i've replaced my data extracted date as 'date', this function first checks if it's a null (didn't found date on document), then if there is a date, it checks if its an int, if it is it adds the number to the date as David pointed out, if not its just the date.