Handle nil is given as filepath