Helpers only created if Laravel App exists

Checks for Laravel application before creating functions needing a loaded instance of Laravel/Laravel. Fixes #3814