Make sure mask fields have been provided

Ticket:	#5207
(cherry picked from commit fdb91f2b6062f9c8e3f94f4a161efb920d704c0e)