Add additional check for resource widget

Add an additional check for 'empty URI'. 'Empty' could also mean 'undefined' or
'null'.