Raise TypeError when setting inappropriate ma fill_value 

Rebased and cleaned up version of #3379.