Add support for testing difference in alpha.

Simplify error check.