The inputdlg help states clearly that the function's "returned variable answer is a cell array", and the exist help clearly states that its input must be a "character vector". So you need to get your character vector out of the cell array and provide it to exist, for example:
>> C = inputdlg('filename:');
>> exist(C{1},'file')==2
ans =
1
>> [FileName,PathName] = uigetfile('*.m')
FileName =
inner.m
PathName =
C:\Temp\TestDir
