No items in database redirects to new task

If there is not task in the database the activity will redirect to new
task activity and kill main untill a active task is added