Made valid.m more valid.

Tiny fix.