TypeError thrown

getCustomHeaderImage(): Argument #1 ($oPost) must be of type WP_Post, null given, called in /home/webzpfeuk/html/Wordpress/wp-content/themes/sunspot/header.php on line 43