null check credentials