Moving a website in 5.7

Permalink
I've been trying to move my website from a XAMMP to Bluehost, however I am receiving a weird error and I'm not really sure the cause or solution to it:


Whoops \ Exception \ ErrorException (E_ERROR)

Call to a member function getRelativePath() on a non-object


$favIconFID=intval(Config::get('concrete.misc.favicon_fid'));
    $appleIconFID =intval(Config::get('concrete.misc.iphone_home_screen_thumbnail_fid'));
    $modernIconFID = intval(Config::get('concrete.misc.modern_tile_thumbnail_fid'));
    $modernIconBGColor = strval(Config::get('concrete.misc.modern_tile_thumbnail_bgcolor'));
    if($favIconFID) {
    $f = File::getByID($favIconFID); ?>
    <link rel="shortcut icon" href="<?php echo $f->getRelativePath()?>" type="image/x-icon" />
    <link rel="icon" href="<?php echo $f->getRelativePath()?>" type="image/x-icon" />
    <?php }


this is the highlighted section of code:
$f = File::getByID($favIconFID); ?>
<link rel="shortcut icon" href="<?php echo $f->getRelativePath()?>" type="image/x-icon" />
<link rel="icon" href="<?php echo $f->getRelativePath()?>" type="image/x-icon" />