Note that sampling from an unbound texture gives inconsistent results across different graphics cards. NVidia and ATI disagree about whether this should return zeros or ones, so you will get different colors depending what card you run on.
As MJP says, the best solution is to pass in a flag indicating whether to use the texture, or perhaps just use an entirely different shader for untextured vs. textured objects. Or you could just put textures on everything in your game! (not actually a crazy solution: many games end up with 99% of their objects textured, in which case it may be more efficient to just slap a 1x1 white texture on the remaining 1% of their graphics, to avoid the cost of having to support untextured objects in their engine).
See the Custom Model Effect or Non Photorealistic samples (both on this site) for examples of shaders that work both with or without a texture, via a TextureEnabled parameter. Or see BasicEffect (the HLSL source is available in the utilities section of this site) for an example of switching to an entirely different shader to handle this.
XNA Framework Developer -
blog -
homepage