corrected type check in navigation