Marriage is fruitful even when no biological offspring is produced. Joseph's marriage was validated, and, in fact, glorified, by his care of Our Lady and child Jesus.
You bet it was.
Matthew 1:25 And knew her not till she had brought forth her firstborn son: and he called his name JESUS.