Fix a issue that about checking target is nothing or not.