[NtUser] Unnecessary check is removed and correct value of an error code is returned