The answer is Yes. Yes it is.
Jesus commands: Go therefore and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit, - Matthew 28:19
And He promises: Whoever believes and is baptized will be saved, but whoever does not believe will be condemned. - Mark 16:16
Some of Luther's thoughts on the subject:
"Therefore they are presumptuous, clumsy minds that draw such inferences and conclusions as these: Where there is not the true faith, there also can be no true Baptism. Just as if I would infer: If I do not believe, then Christ is nothing; or thus: If I am not obedient, then father, mother, and government are nothing. Is that a correct conclusion, that whenever any one does not do what he ought, the thing in itself shall be nothing and of no value? My dear, just invert the argument and rather draw this inference: For this very reason Baptism is something and is right, because it has been wrongly received. For if it were not right and true in itself, it could not be misused nor sinned against. The saying is: Abusus non tollit, sed confirmat substantiam, Abuse does not destroy the essence, but confirms it. For gold is not the less gold though a harlot wear it in sin and shame.
Therefore let it be decided that Baptism always remains true, retains its full essence, even though a single person should be baptized, and he, in addition, should not believe truly. For God's ordinance and Word cannot be made variable or be altered by men. But these people, the fanatics, are so blinded that they do not see the Word and command of God, and regard Baptism and the magistrates only as they regard water in the brook or in pots, or as any other man; and because they do not see faith nor obedience, they conclude that they are to be regarded as invalid. Here lurks a concealed seditious devil, who would like to tear the crown from the head of authority and then trample it under foot, and, in addition, pervert and bring to naught all the works and ordinances of God. Therefore we must be watchful and well armed, and not allow ourselves to be directed nor turned away from the Word, in order that we may not regard Baptism as a mere empty sign, as the fanatics dream." - Martin Luther, Large Catechism