added check for nil account created