Simplify excerpt check. All variables are null unless defined allowing you to use simple conditions.