specifying NaN color when using imshow


I'm trying to plot some grid data using basemap and imshow however
haven't figured out how to specify the color for nan values.
For example, in my data, valid values range from 0.0-10.0. I've
assigned -9999.0 and 1e30 to the missing values and when I imshow
(setting vmin=0.0, vmax=10.0), the missing values show up in the
low and high end of the spectrum, respectively. Is there a way
to do this?