Added null check for keypairs
Merge pull request #24 from maksimov/develop

Added null check for keypairs